package com.gosling.cloudspace.service;

import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gosling.cloudspace.common.entity.pojo.OrderInfoPO;
import com.gosling.cloudspace.common.exception.CommonException;
import com.gosling.cloudspace.common.service.OrderInfoService;
import com.gosling.cloudspace.mapper.OrderInfoMapper;
import org.springframework.stereotype.Service;


@Service
public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfoPO> implements OrderInfoService {

    @Override
    public OrderInfoPO findByOrderNo(String orderNo) {
        if (StrUtil.isBlank(orderNo)) {
            throw new CommonException("订单号不存在");
        }
        return baseMapper.byOrderNo(orderNo);
    }
}
